

n <- 1000

data <- runif(n, min=0, max=100)

hist(data, breaks=20, main="Uniform Distribution Histogram", xlab="Value", ylab="Frequency", probability = TRUE)


wait_monday <- runif(1000, min=0, max=10)
wait_wednesday <- runif(1000, min=0, max=10)
wait_friday <- runif(1000, min=0, max=10)

long_wait <- pmax(wait_monday, wait_wednesday, wait_friday)

print(long_wait)

h <- hist(long_wait, breaks=20, main="Long Wait Times Histogram", xlab="Wait Time", ylab="Frequency", probability = TRUE)

min_x <- min(h$breaks)
max_x <- max(h$breaks)

curve(3 *x**2/1000, from=min_x, to=max_x, add=TRUE, col="red", lwd=2)


mean(long_wait > 8)

mean(long_wait)
sd(long_wait)

quantile(long_wait, c(0.1, 0.9, 0.7))


pnorm(240, mean = 274, sd=43)

pnorm(280, mean = 274, sd=43) - pnorm(230, mean = 274, sd=43)

qnorm(0.25, 274, 43)
qnorm(0.9, 274, 43)
